package com.demo.rpc.test.service;

import com.demo.rpc.annotation.RpcService;
import org.springframework.stereotype.Component;

@RpcService(PersonService.class)
@Component
public class PersonServiceImpl implements PersonService {
    public Person getInfo() {
        Person person = new Person();
        person.setAge(22);
        person.setName("qjm");
        person.setSex("男");
        return person;
    }

    public boolean printInfo(Person person) {
        System.out.println("客户端请求数据:" + person);
        if (person != null) {
            return true;
        }
        return false;
    }
}
